package com.songlanyun.modules.marketing.groupbuy.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.modules.marketing.groupbuy.entity.GroupBuyActivityGoods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.songlanyun.modules.marketing.groupbuy.model.vo.GroupBuyActivityGoodsVO;
import com.songlanyun.modules.marketing.seckill.model.vo.SeckillActivityGoodsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 拼团活动商品表
 *
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2020-11-27 14:03:38
 */
@Mapper
public interface GroupBuyActivityGoodsDao extends BaseMapper<GroupBuyActivityGoods> {

    IPage<GroupBuyActivityGoodsVO> goodsPage(IPage<GroupBuyActivityGoodsVO> page, @Param("vo") Map<String, Object> params);

    List<GroupBuyActivityGoodsVO> groupBuying(Long shopId);

    GroupBuyActivityGoodsVO groupBuyGoodsInfo(Map<String, Object> params);

    Boolean verifyByGroupBuyAndGoods(Long groupBuyId, Long goodsId);

    Boolean verifyByGroupBuyGoods(Long groupBuyGoodsId);

    List<GroupBuyActivityGoodsVO> willYouSpell(@Param("p") Map<String, Object> params);

    IPage<GroupBuyActivityGoodsVO> willYouSpellPage(IPage<GroupBuyActivityGoodsVO> page, @Param("p") Map<String, Object> params);

    List<GroupBuyActivityGoods> listByGroupBuyId(Long groupBuyId);

}
